package dth.entity;

import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import dth.utils.DthUtil;

@Entity
@Table(name="setup_box")
public class SetupBox {
	@Id
	@Column(columnDefinition="int",name="setupbox_id")
	private int id;
	@Column(columnDefinition="char",name="setupbox_type")
	private String type;
	@Column(columnDefinition="double",name="setupbox_price")
	private double price;
	@Column(columnDefinition="int",name="fk_admin_id")
	private int fkAdminId;
	@Column(columnDefinition="datetime",name="date_insert")
	private Date dateInsert;
	@Column(columnDefinition="varchar",name="setupbox_image")
	private String image;
	@Column(columnDefinition="longtext",name="setupbox_description")
	private String description;
	@Transient
	private String priceStr;
	
	
	public String getPriceStr() {
		return DthUtil.getFormatedNumber(price);
	}
	public void setPriceStr(String priceStr) {
		this.priceStr = priceStr;
	}
	public int getId() {
		return id;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getImage() {
		return image;
	}
	public void setImage(String image) {
		this.image = image;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public int getFkAdminId() {
		return fkAdminId;
	}
	public void setFkAdminId(int fkAdminId) {
		this.fkAdminId = fkAdminId;
	}
	public Date getDateInsert() {
		return dateInsert;
	}
	public void setDateInsert(Date dateInsert) {
		this.dateInsert = dateInsert;
	}
}
